package test.collections.compare;

import java.util.Comparator;

import test.collections.domain.SortType;

public class Comparators {
	
	public static Comparator getComparator(){
		return new Comparator() {
			@Override
			public int compare(Object o1, Object o2) {
				if(o1 instanceof String) {
					return compare((String)o1, (String)o2);
				} else if (o1 instanceof Integer) {
					return compare((Integer)o1, (Integer)o2);
				} else if (o1 instanceof SortType){
					return compare((SortType)o1, (SortType)o2);
				} else {
					System.out.println("no confirm");
					return 1;
				}
			}
		};
	}

}
